// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import  './rem' 
require('swiper/dist/css/swiper.css')
import '@/common/less/index.less'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import resource from 'vue-resource'
import VueLazyload from 'vue-lazyload'


import Mint from 'mint-ui';
import 'mint-ui/lib/style.css';
Vue.use(Mint);

import Moment from 'moment'
Vue.filter('convertDate',function (value) {
  return Moment(value).format('YYYY-MM-DD HH:mm:ss')
})
// Vue.use(VueLazyload)
Vue.use(resource)
Vue.use(VueAwesomeSwiper)

import VuePreview from 'vue-preview'
Vue.use(VuePreview)

import axios from 'axios'
Vue.prototype.$axios = axios;



Vue.use(VueLazyload, {
    error: require('./assets/images/lazy/error.jpg'),
    loading: require('./assets/images/lazy/load.jpg'),
 
  }) 
 
  //  Vue.use(VueLazyload, {
  //   preLoad: 1.3,
  //   // error: 'http://alicdn.avicare.cn/group1/M00/00/7F/O24cYVjt4GKAJovCAABAeKv7Krs288.jpg',
  //   error: process.env.imgUrl+'/group1/M00/00/7F/O24cYVjt4GKAJovCAABAeKv7Krs288.jpg',
  //   // loading: 'http://alicdn.avicare.cn/group1/M00/01/42/O24cYVk6SI2Aab6hAAAnOPGrbVU193.jpg',
  //   loading: process.env.imgUrl+'/group1/M00/01/42/O24cYVk6SI2Aab6hAAAnOPGrbVU193.jpg',
  //   attempt: 1
  // })

new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App },
  data: {
    // 空的实例放到根组件下，所有的子组件都能调用
    Bus: new Vue()
   }
})
